const Koa = require('koa')
const Router = require('koa-router')
const app = new Koa()
const router = new Router()
const opcH5 = require('./deploy/opc-h5')
const opc = require('./deploy/opc')
const wmBackend = require('./deploy/wemark-backend')
const wmFrontend = require('./deploy/wemark-frontend')

router.post('/deploy/opc-h5', function (ctx, next) {
    opcH5()
    ctx.body = 'ok'
})

router.post('/deploy/opc', function (ctx, next) {
    opc()
    ctx.body = 'ok'
})

router.post('/deploy/wemark-frontend', function (ctx, next) {
    wmFrontend()
    ctx.body = 'ok'
})

router.post('/deploy/wemark-backend', function (ctx, next) {
    wmBackend()
    ctx.body = 'ok'
})

app.use(router.routes())
app.use(router.allowedMethods())

app.listen(3800)